#
# 1394020320@qq.com
#
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4355 /wd4225 /wd4244 /wd4996")
  if(MSVC_VERSION LESS 1600)
      include_directories(${PROJECT_SOURCE_DIR}/third-part/stdint)
  endif()

else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
# 检查目标平台是否为ARM
if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm" OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv8-a+simd")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv8-a+simd")
#enable_language(ASM)
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1")
endif()
add_definitions(-DSK_USE_POSIX_THREADS)
endif()

if(NOT CMAKE_SYSTEM_NAME MATCHES Windows)
include_directories(${Fontconfig_INCLUDE_DIRS})
endif()

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/config)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/core)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/gpu)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/images)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/utils)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/utils/win)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/ports)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/text)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/effects)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/pathops)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/views)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/core)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/image)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/opts)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/lazy)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/sfnt)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/gpu)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/utils)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/core)

add_definitions (
    -D_CRT_SECURE_NO_WARNINGS
    -DSK_IGNORE_ETC1_SUPPORT
    )

#
# TODO
# 由于源文件太多，且有很多没有使用到，使用其他过滤手段没有方法过滤
# 先从工程文件中导出源文件列表
#

set(headers
	src/fonts/SkGScalerContext.h
	src/fonts/SkTestScalerContext.h
	src/utils/SkBase64.h
	src/utils/SkBitmapHasher.h
	src/utils/SkBitSet.h
	src/utils/SkCanvasStack.h
	src/utils/SkCondVar.h
	src/utils/SkDashPathPriv.h
	src/utils/SkFloatUtils.h
	src/utils/SkGatherPixelRefsAndRects.h
	src/utils/SkMatrix22.h
	src/utils/SkMD5.h
	src/utils/SkPatchGrid.h
	src/utils/SkPatchUtils.h
	src/utils/SkRunnable.h
	src/utils/SkSHA1.h
	src/utils/SkTextureCompressor.h
	src/utils/SkTextureCompressor_ASTC.h
	src/utils/SkTextureCompressor_Blitter.h
	src/utils/SkTextureCompressor_LATC.h
	src/utils/SkTextureCompressor_R11EAC.h
	src/utils/SkTFitsIn.h
	src/utils/SkThreadUtils.h
	src/utils/SkThreadUtils_win.h
	src/utils/SkTLogic.h
	src/core/SkAntiRun.h
	src/core/SkBBoxHierarchy.h
	src/core/SkBBoxHierarchyRecord.h
	src/core/SkBBoxRecord.h
	src/core/SkBitmapFilter.h
	src/core/SkBitmapHeap.h
	src/core/SkBitmapProcShader.h
	src/core/SkBitmapProcState.h
	src/core/SkBitmapProcState_matrix.h
	src/core/SkBitmapProcState_sample.h
	src/core/SkBitmapScaler.h
	src/core/SkBlitBWMaskTemplate.h
	src/core/SkBlitter.h
	src/core/SkConfig8888.h
	src/core/SkConvolver.h
	src/core/SkCoreBlitters.h
	src/core/SkCubicClipper.h
	src/core/SkDistanceFieldGen.h
	src/core/SkDrawProcs.h
	src/core/SkEdge.h
	src/core/SkErrorInternals.h
	src/core/SkFilterProc.h
	src/core/SkFloat.h
	src/core/SkFontDescriptor.h
	src/core/SkFontStream.h
	src/core/SkGlyphCache.h
	src/core/SkGlyphCache_Globals.h
	src/core/SkMaskGamma.h
	src/core/SkMessageBus.h
	src/core/SkPaintPriv.h
	src/core/SkPathHeap.h
	src/core/SkPictureContentInfo.h
	src/core/SkPictureData.h
	src/core/SkPictureFlat.h
	src/core/SkPicturePlayback.h
	src/core/SkPictureRecord.h
	src/core/SkPictureShader.h
	src/core/SkPictureStateTree.h
	src/core/SkQuadClipper.h
	src/core/SkReadBuffer.h
	src/core/SkReader32.h
	src/core/SkRegionPriv.h
	src/core/SkRTree.h
	src/core/SkScalerContext.h
	src/core/SkScan.h
	src/core/SkScanPriv.h
	src/core/SkSinTable.h
	src/core/SkSpriteBlitter.h
	src/core/SkSpriteBlitterTemplate.h
	src/core/SkStreamPriv.h
	src/core/SkStroke.h
	src/core/SkStrokerPriv.h
	src/core/SkTextFormatParams.h
	src/core/SkTextMapStateProc.h
	src/core/SkTileGrid.h
	src/core/SkTLList.h
	src/core/SkTraceEvent.h
	src/core/SkTSort.h
	src/core/SkTypefaceCache.h
	src/core/SkResourceCache.h
	src/image/SkSurface_Base.h
	src/lazy/SkCachingPixelRef.h
	src/pathops/SkAddIntersections.h
	src/pathops/SkDQuadImplicit.h
	src/pathops/SkIntersectionHelper.h
	src/pathops/SkIntersections.h
	src/pathops/SkLineParameters.h
	src/pathops/SkOpAngle.h
	src/pathops/SkOpContour.h
	src/pathops/SkOpEdgeBuilder.h
	src/pathops/SkOpSegment.h
	src/pathops/SkOpSpan.h
	src/pathops/SkPathOpsBounds.h
	src/pathops/SkPathOpsCommon.h
	src/pathops/SkPathOpsCubic.h
	src/pathops/SkPathOpsCurve.h
	src/pathops/SkPathOpsDebug.h
	src/pathops/SkPathOpsLine.h
	src/pathops/SkPathOpsPoint.h
	src/pathops/SkPathOpsQuad.h
	src/pathops/SkPathOpsRect.h
	src/pathops/SkPathOpsTriangle.h
	src/pathops/SkPathOpsTypes.h
	src/pathops/SkPathWriter.h
	src/pathops/SkQuarticRoot.h
	src/pathops/SkReduceOrder.h
	src/effects/SkBlurMask.h
	src/effects/SkEmbossMask.h
	src/effects/SkEmbossMask_Table.h
	src/effects/SkGpuBlurUtils.h
	src/effects/gradients/SkClampRange.h
	src/effects/gradients/SkGradientBitmapCache.h
	src/effects/gradients/SkGradientShaderPriv.h
	src/effects/gradients/SkLinearGradient.h
	src/effects/gradients/SkRadialGradient.h
	src/effects/gradients/SkRadialGradient_Table.h
	src/effects/gradients/SkSweepGradient.h
	src/effects/gradients/SkTwoPointConicalGradient.h
	src/effects/gradients/SkTwoPointConicalGradient_gpu.h
	src/effects/gradients/SkTwoPointRadialGradient.h
	src/ports/SkAtomics_sync.h
	src/ports/SkAtomics_win.h
	src/ports/SkMutex_win.h
	src/gpu/GrAAConvexPathRenderer.h
	src/gpu/GrAAHairLinePathRenderer.h
	src/gpu/GrAARectRenderer.h
	src/gpu/GrAllocator.h
	src/gpu/GrAllocPool.h
	src/gpu/GrAtlas.h
	src/gpu/GrBitmapTextContext.h
	src/gpu/GrBlend.h
	src/gpu/GrBufferAllocPool.h
	src/gpu/GrClipMaskCache.h
	src/gpu/GrClipMaskManager.h
	src/gpu/GrDefaultPathRenderer.h
	src/gpu/GrDistanceFieldTextContext.h
	src/gpu/GrDrawState.h
	src/gpu/GrDrawTarget.h
	src/gpu/GrDrawTargetCaps.h
	src/gpu/GrGeometryBuffer.h
	src/gpu/GrGpu.h
	src/gpu/GrIndexBuffer.h
	src/gpu/GrInOrderDrawBuffer.h
	src/gpu/GrLayerCache.h
	src/gpu/GrMemoryPool.h
	src/gpu/GrOrderedSet.h
	src/gpu/GrOvalRenderer.h
	src/gpu/GrPath.h
	src/gpu/GrPathRange.h
	src/gpu/GrPathRenderer.h
	src/gpu/GrPathRendering.h
	src/gpu/GrPathUtils.h
	src/gpu/GrPictureUtils.h
	src/gpu/GrPlotMgr.h
	src/gpu/GrRectanizer.h
	src/gpu/GrRectanizer_pow2.h
	src/gpu/GrRectanizer_skyline.h
	src/gpu/GrRedBlackTree.h
	src/gpu/GrReducedClip.h
	src/gpu/GrResourceCache.h
	src/gpu/GrResourceCache2.h
	src/gpu/GrRODrawState.h
	src/gpu/GrSoftwarePathRenderer.h
	src/gpu/GrStencil.h
	src/gpu/GrStencilAndCoverPathRenderer.h
	src/gpu/GrStencilAndCoverTextContext.h
	src/gpu/GrStencilBuffer.h
	src/gpu/GrStrokeInfo.h
	src/gpu/GrSWMaskHelper.h
	src/gpu/GrTBSearch.h
	src/gpu/GrTemplates.h
	src/gpu/GrTextContext.h
	src/gpu/GrTextStrike.h
	src/gpu/GrTextStrike_impl.h
	src/gpu/GrTraceMarker.h
	src/gpu/GrTracing.h
	src/gpu/GrVertexBuffer.h
	src/gpu/GrOptDrawState.h
	src/gpu/gl/GrGLAssembleInterface.h
	src/gpu/gl/GrGLBufferImpl.h
	src/gpu/gl/GrGLCaps.h
	src/gpu/gl/GrGLContext.h
	src/gpu/gl/GrGLDefines.h
	src/gpu/gl/GrGLIndexBuffer.h
	src/gpu/gl/GrGLIRect.h
	src/gpu/gl/GrGLNameAllocator.h
	src/gpu/gl/GrGLNoOpInterface.h
	src/gpu/gl/GrGLPath.h
	src/gpu/gl/GrGLPathRange.h
	src/gpu/gl/GrGLPathRendering.h
	src/gpu/gl/GrGLProgram.h
	src/gpu/gl/GrGLProgramDataManager.h
	src/gpu/gl/GrGLProgramDesc.h
	src/gpu/gl/GrGLProgramEffects.h
	src/gpu/gl/GrGLRenderTarget.h
	src/gpu/gl/GrGLShaderVar.h
	src/gpu/gl/GrGLSL.h
	src/gpu/gl/GrGLSL_impl.h
	src/gpu/gl/GrGLStencilBuffer.h
	src/gpu/gl/GrGLTexture.h
	src/gpu/gl/GrGLUniformHandle.h
	src/gpu/gl/GrGLUtil.h
	src/gpu/gl/GrGLVertexArray.h
	src/gpu/gl/GrGLVertexBuffer.h
	src/gpu/gl/GrGpuGL.h
	src/gpu/gl/debug/GrBufferObj.h
	src/gpu/gl/debug/GrDebugGL.h
	src/gpu/gl/debug/GrFakeRefObj.h
	src/gpu/gl/debug/GrFBBindableObj.h
	src/gpu/gl/debug/GrFrameBufferObj.h
	src/gpu/gl/debug/GrProgramObj.h
	src/gpu/gl/debug/GrRenderBufferObj.h
	src/gpu/gl/debug/GrShaderObj.h
	src/gpu/gl/debug/GrTextureObj.h
	src/gpu/gl/debug/GrTextureUnitObj.h
	src/gpu/gl/debug/GrVertexArrayObj.h
	src/gpu/gl/builders/GrGLFragmentShaderBuilder.h
	src/gpu/gl/builders/GrGLGeometryShaderBuilder.h
	src/gpu/gl/builders/GrGLProgramBuilder.h
	src/gpu/gl/builders/GrGLShaderBuilder.h
	src/gpu/gl/builders/GrGLShaderStringBuilder.h
	src/gpu/gl/builders/GrGLVertexShaderBuilder.h
	src/gpu/gl/builders/GrGLFullProgramBuilder.h
	src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.h
	src/gpu/effects/Gr1DKernelEffect.h
	src/gpu/effects/GrBezierEffect.h
	src/gpu/effects/GrBicubicEffect.h
	src/gpu/effects/GrConfigConversionEffect.h
	src/gpu/effects/GrConvexPolyEffect.h
	src/gpu/effects/GrConvolutionEffect.h
	src/gpu/effects/GrCustomCoordsTextureEffect.h
	src/gpu/effects/GrDashingEffect.h
	src/gpu/effects/GrDistanceFieldTextureEffect.h
	src/gpu/effects/GrDitherEffect.h
	src/gpu/effects/GrMatrixConvolutionEffect.h
	src/gpu/effects/GrOvalEffect.h
	src/gpu/effects/GrRRectEffect.h
	src/gpu/effects/GrSimpleTextureEffect.h
	src/gpu/effects/GrSingleTextureEffect.h
	src/gpu/effects/GrTextureDomain.h
	src/gpu/effects/GrTextureStripAtlas.h
	src/gpu/effects/GrYUVtoRGBEffect.h
	include/core/SkAdvancedTypefaceMetrics.h
	include/core/SkBBHFactory.h
	include/core/SkBitmap.h
	include/core/SkBitmapDevice.h
	include/core/SkBlitRow.h
	include/core/SkCanvas.h
	include/core/SkChunkAlloc.h
	include/core/SkClipStack.h
	include/core/SkColor.h
	include/core/SkColorFilter.h
	include/core/SkColorPriv.h
	include/core/SkColorShader.h
	include/core/SkComposeShader.h
	include/core/SkData.h
	include/core/SkDeque.h
	include/core/SkDevice.h
	include/core/SkDither.h
	include/core/SkDraw.h
	include/core/SkDrawFilter.h
	include/core/SkDrawLooper.h
	include/core/SkEndian.h
	include/core/SkError.h
	include/core/SkFixed.h
	include/core/SkFlattenable.h
	include/core/SkFlattenableSerialization.h
	include/core/SkFloatBits.h
	include/core/SkFloatingPoint.h
	include/core/SkFontHost.h
	include/core/SkGraphics.h
	include/core/SkImage.h
	include/core/SkImageDecoder.h
	include/core/SkImageEncoder.h
	include/core/SkImageFilter.h
	include/core/SkImageInfo.h
	include/core/SkInstCnt.h
	include/core/SkMallocPixelRef.h
	include/core/SkMask.h
	include/core/SkMaskFilter.h
	include/core/SkMath.h
	include/core/SkMatrix.h
	include/core/SkMetaData.h
	include/core/SkMultiPictureDraw.h
	include/core/SkOnce.h
	include/core/SkOSFile.h
	include/core/SkPackBits.h
	include/core/SkPaint.h
	include/core/SkPath.h
	include/core/SkPathEffect.h
	include/core/SkPathMeasure.h
	include/core/SkPathRef.h
	include/core/SkPicture.h
	include/core/SkPictureRecorder.h
	include/core/SkPixelRef.h
	include/core/SkPoint.h
	include/core/SkPreConfig.h
	include/core/SkRasterizer.h
	include/core/SkRect.h
	include/core/SkRefCnt.h
	include/core/SkRegion.h
	include/core/SkRRect.h
	include/core/SkScalar.h
	include/core/SkShader.h
	include/core/SkStream.h
	include/core/SkString.h
	include/core/SkStrokeRec.h
	include/core/SkSurface.h
	include/core/SkTArray.h
	include/core/SkTDArray.h
	include/core/SkTDict.h
	include/core/SkTDStack.h
	include/core/SkTemplates.h
	include/core/SkTextBlob.h
	include/core/SkThread.h
	include/core/SkTime.h
	include/core/SkTInternalLList.h
	include/core/SkTLazy.h
	include/core/SkTRegistry.h
	include/core/SkTSearch.h
	include/core/SkTypeface.h
	include/core/SkTypes.h
	include/core/SkUnPreMultiply.h
	include/core/SkUtils.h
	include/core/SkWeakRefCnt.h
	include/core/SkWriter32.h
	include/core/SkXfermode.h
	include/utils/SkBoundaryPatch.h
	include/utils/SkCamera.h
	include/utils/SkCanvasStateUtils.h
	include/utils/SkCubicInterval.h
	include/utils/SkCullPoints.h
	include/utils/SkDebugUtils.h
	include/utils/SkDumpCanvas.h
	include/utils/SkEventTracer.h
	include/utils/SkFrontBufferedStream.h
	include/utils/SkInterpolator.h
	include/utils/SkLayer.h
	include/utils/SkMatrix44.h
	include/utils/SkMeshUtils.h
	include/utils/SkNinePatch.h
	include/utils/SkNoSaveLayerCanvas.h
	include/utils/SkNullCanvas.h
	include/utils/SkNWayCanvas.h
	include/utils/SkParse.h
	include/utils/SkParsePaint.h
	include/utils/SkParsePath.h
	include/utils/SkPictureUtils.h
	include/utils/SkProxyCanvas.h
	include/utils/SkRandom.h
	include/utils/SkRTConf.h
	include/utils/SkWGL.h
	include/utils/win/SkAutoCoInitialize.h
	include/utils/win/SkHRESULT.h
	include/utils/win/SkIStream.h
	include/utils/win/SkTScopedComPtr.h
	include/utils/mac/SkCGUtils.h
	include/pathops/SkPathOps.h
	include/effects/Sk1DPathEffect.h
	include/effects/Sk2DPathEffect.h
	include/effects/SkAlphaThresholdFilter.h
	include/effects/SkArithmeticMode.h
	include/effects/SkAvoidXfermode.h
	include/effects/SkBitmapSource.h
	include/effects/SkBlurDrawLooper.h
	include/effects/SkBlurImageFilter.h
	include/effects/SkBlurMaskFilter.h
	include/effects/SkColorFilterImageFilter.h
	include/effects/SkColorMatrix.h
	include/effects/SkColorMatrixFilter.h
	include/effects/SkCornerPathEffect.h
	include/effects/SkDashPathEffect.h
	include/effects/SkDiscretePathEffect.h
	include/effects/SkDisplacementMapEffect.h
	include/effects/SkDrawExtraPathEffect.h
	include/effects/SkDropShadowImageFilter.h
	include/effects/SkEmbossMaskFilter.h
	include/effects/SkGradientShader.h
	include/effects/SkLayerDrawLooper.h
	include/effects/SkLayerRasterizer.h
	include/effects/SkLerpXfermode.h
	include/effects/SkLightingImageFilter.h
	include/effects/SkLumaColorFilter.h
	include/effects/SkMagnifierImageFilter.h
	include/effects/SkMorphologyImageFilter.h
	include/effects/SkOffsetImageFilter.h
	include/effects/SkPaintFlagsDrawFilter.h
	include/effects/SkPerlinNoiseShader.h
	include/effects/SkPixelXorXfermode.h
	include/effects/SkPorterDuff.h
	include/effects/SkRectShaderImageFilter.h
	include/effects/SkTableColorFilter.h
	include/effects/SkTableMaskFilter.h
	include/effects/SkTileImageFilter.h
	include/effects/SkTransparentShader.h
	include/effects/SkXfermodeImageFilter.h
	include/ports/SkFontConfigInterface.h
	include/ports/SkFontMgr.h
	include/ports/SkFontMgr_indirect.h
	include/ports/SkFontStyle.h
	include/ports/SkRemotableFontMgr.h
	include/gpu/GrClipData.h
	include/gpu/GrColor.h
	include/gpu/GrConfig.h
	include/gpu/GrContext.h
	include/gpu/GrContextFactory.h
	include/gpu/GrCoordTransform.h
	include/gpu/GrFontScaler.h
	include/gpu/GrGlyph.h
	include/gpu/GrGpuResource.h
	include/gpu/GrPaint.h
	include/gpu/GrPathRendererChain.h
	include/gpu/GrRect.h
	include/gpu/GrRenderTarget.h
	include/gpu/GrSurface.h
	include/gpu/GrTexture.h
	include/gpu/GrTextureAccess.h
	include/gpu/GrTypes.h
	include/gpu/GrUserConfig.h
	include/gpu/SkGr.h
	include/gpu/SkGrPixelRef.h
	include/gpu/SkGrTexturePixelRef.h
	include/gpu/gl/GrGLConfig.h
	include/gpu/gl/GrGLExtensions.h
	include/gpu/gl/GrGLFunctions.h
	include/gpu/gl/GrGLInterface.h
	include/gpu/gl/GrGLSLPrettyPrint.h
	include/gpu/gl/SkDebugGLContext.h
	include/gpu/gl/SkGLContextHelper.h
	include/gpu/gl/SkMesaGLContext.h
	include/gpu/gl/SkNativeGLContext.h
	include/gpu/gl/SkNullGLContext.h
	include/gpu/gl/SkANGLEGLContext.h
	src/images/bmpdecoderhelper.h
	src/images/SkScaledBitmapSampler.h
	src/images/transform_scanline.h
)

set(srcs
    "src/gpu/GrAAConvexPathRenderer.cpp" 
    "src/gpu/GrAAHairLinePathRenderer.cpp" 
    "src/gpu/GrAARectRenderer.cpp" 
    "src/gpu/GrAddPathRenderers_default.cpp" 
    "src/gpu/GrAllocPool.cpp" 
    "src/gpu/GrAtlas.cpp" 
    "src/gpu/effects/GrBezierEffect.cpp" 
    "src/gpu/effects/GrBicubicEffect.cpp" 
    "src/gpu/GrBitmapTextContext.cpp" 
    "src/gpu/GrBlend.cpp" 
    "src/gpu/GrBufferAllocPool.cpp" 
    "src/gpu/gl/debug/GrBufferObj.cpp" 
    "src/gpu/GrCacheID.cpp" 
    "src/gpu/GrClipData.cpp" 
    "src/gpu/GrClipMaskCache.cpp" 
    "src/gpu/GrClipMaskManager.cpp" 
    "src/gpu/effects/GrConfigConversionEffect.cpp" 
    "src/gpu/GrContext.cpp" 
    "src/gpu/effects/GrConvexPolyEffect.cpp" 
    "src/gpu/effects/GrConvolutionEffect.cpp" 
    "src/gpu/effects/GrCustomCoordsTextureEffect.cpp" 
    "src/gpu/effects/GrDashingEffect.cpp" 
    "src/gpu/gl/debug/GrDebugGL.cpp" 
    "src/gpu/GrDefaultPathRenderer.cpp" 
    "src/gpu/GrDistanceFieldTextContext.cpp" 
    "src/gpu/effects/GrDistanceFieldTextureEffect.cpp" 
    "src/gpu/effects/GrDitherEffect.cpp" 
    "src/gpu/GrDrawState.cpp" 
    "src/gpu/GrDrawTarget.cpp" 
    "src/gpu/GrFontScaler.cpp" 
    "src/gpu/gl/debug/GrFrameBufferObj.cpp" 
    "src/gpu/gl/GrGLAssembleInterface.cpp" 
    "src/gpu/gl/GrGLBufferImpl.cpp" 
    "src/gpu/gl/GrGLCaps.cpp" 
    "src/gpu/gl/GrGLContext.cpp" 
    "src/gpu/gl/debug/GrGLCreateDebugInterface.cpp" 
    #"src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp" 
    "src/gpu/gl/GrGLCreateNullInterface.cpp" 
    "src/gpu/gl/GrGLDefaultInterface_native.cpp" 
    "src/gpu/gl/GrGLExtensions.cpp" 
    "src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.cpp" 
    "src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp" 
    "src/gpu/gl/builders/GrGLFullProgramBuilder.cpp" 
    "src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp" 
    "src/gpu/gl/GrGLIndexBuffer.cpp" 
    "src/gpu/gl/GrGLInterface.cpp" 
    "src/gpu/gl/GrGLNameAllocator.cpp" 
    "src/gpu/gl/GrGLNoOpInterface.cpp" 
    "src/gpu/gl/GrGLPath.cpp" 
    "src/gpu/gl/GrGLPathRange.cpp" 
    "src/gpu/gl/GrGLPathRendering.cpp" 
    "src/gpu/gl/GrGLProgram.cpp" 
    "src/gpu/gl/builders/GrGLProgramBuilder.cpp" 
    "src/gpu/gl/GrGLProgramDataManager.cpp" 
    "src/gpu/gl/GrGLProgramDesc.cpp" 
    "src/gpu/gl/GrGLProgramEffects.cpp" 
    "src/gpu/gl/GrGLRenderTarget.cpp" 
    "src/gpu/gl/GrGLSL.cpp" 
    "src/gpu/gl/builders/GrGLSLPrettyPrint.cpp" 
    "src/gpu/gl/builders/GrGLShaderBuilder.cpp" 
    "src/gpu/gl/builders/GrGLShaderStringBuilder.cpp" 
    "src/gpu/gl/GrGLStencilBuffer.cpp" 
    "src/gpu/gl/GrGLTexture.cpp" 
    "src/gpu/gl/GrGLUtil.cpp" 
    "src/gpu/gl/GrGLVertexArray.cpp" 
    "src/gpu/gl/GrGLVertexBuffer.cpp" 
    "src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp" 
    "src/gpu/GrGpu.cpp" 
    "src/gpu/GrGpuFactory.cpp" 
    "src/gpu/gl/GrGpuGL.cpp" 
    "src/gpu/gl/GrGpuGL_program.cpp" 
    "src/gpu/GrGpuResource.cpp" 
    "src/gpu/GrGpuResourceRef.cpp" 
    "src/gpu/GrInOrderDrawBuffer.cpp" 
    "src/gpu/GrLayerCache.cpp" 
    "src/gpu/effects/GrMatrixConvolutionEffect.cpp" 
    "src/gpu/GrMemoryPool.cpp" 
    "src/gpu/GrOptDrawState.cpp" 
    "src/gpu/effects/GrOvalEffect.cpp" 
    "src/gpu/GrOvalRenderer.cpp" 
    "src/gpu/GrPaint.cpp" 
    "src/gpu/GrPath.cpp" 
    "src/gpu/GrPathRange.cpp" 
    "src/gpu/GrPathRenderer.cpp" 
    "src/gpu/GrPathRendererChain.cpp" 
    "src/gpu/GrPathRendering.cpp" 
    "src/gpu/GrPathUtils.cpp" 
    "src/gpu/GrPictureUtils.cpp" 
    "src/gpu/GrProcessor.cpp" 
    "src/gpu/GrProgramElement.cpp" 
    "src/gpu/gl/debug/GrProgramObj.cpp" 
    "src/gpu/GrRODrawState.cpp" 
    "src/gpu/effects/GrRRectEffect.cpp" 
    "src/gpu/GrRectanizer_pow2.cpp" 
    "src/gpu/GrRectanizer_skyline.cpp" 
    "src/gpu/GrReducedClip.cpp" 
    "src/gpu/GrRenderTarget.cpp" 
    "src/gpu/GrResourceCache.cpp" 
    "src/gpu/GrResourceCache2.cpp" 
    "src/gpu/GrSWMaskHelper.cpp" 
    "src/gpu/gl/debug/GrShaderObj.cpp" 
    "src/gpu/effects/GrSimpleTextureEffect.cpp" 
    "src/gpu/effects/GrSingleTextureEffect.cpp" 
    "src/gpu/GrSoftwarePathRenderer.cpp" 
    "src/gpu/GrStencil.cpp" 
    "src/gpu/GrStencilAndCoverPathRenderer.cpp" 
    "src/gpu/GrStencilAndCoverTextContext.cpp" 
    "src/gpu/GrStencilBuffer.cpp" 
    "src/gpu/GrSurface.cpp" 
    "src/gpu/GrTextContext.cpp" 
    "src/gpu/GrTextStrike.cpp" 
    "src/gpu/GrTexture.cpp" 
    "src/gpu/GrTextureAccess.cpp" 
    "src/gpu/effects/GrTextureDomain.cpp" 
    "src/gpu/gl/debug/GrTextureObj.cpp" 
    "src/gpu/effects/GrTextureStripAtlas.cpp" 
    "src/gpu/gl/debug/GrTextureUnitObj.cpp" 
    "src/gpu/GrTraceMarker.cpp" 
    "src/gpu/effects/GrYUVtoRGBEffect.cpp" 
    "src/effects/Sk1DPathEffect.cpp" 
    "src/effects/Sk2DPathEffect.cpp" 
    "src/core/SkAAClip.cpp" 
    "src/pathops/SkAddIntersections.cpp" 
    "src/core/SkAdvancedTypefaceMetrics.cpp" 
    "src/core/SkAlphaRuns.cpp" 
    "src/effects/SkAlphaThresholdFilter.cpp" 
    "src/core/SkAnnotation.cpp" 
    "src/effects/SkArithmeticMode.cpp" 
    #"src/utils/win/SkAutoCoInitialize.cpp" 
    "src/effects/SkAvoidXfermode.cpp" 
    "src/core/SkBBHFactory.cpp" 
    "src/core/SkBBoxHierarchyRecord.cpp" 
    "src/core/SkBBoxRecord.cpp" 
    "src/utils/SkBase64.cpp" 
    "src/utils/SkBitSet.cpp" 
    "src/core/SkBitmap.cpp" 
    "src/core/SkBitmapCache.cpp" 
    "src/core/SkBitmapDevice.cpp" 
    "src/core/SkBitmapFilter.cpp" 
    "src/utils/SkBitmapHasher.cpp" 
    "src/core/SkBitmapHeap.cpp" 
    "src/core/SkBitmapProcShader.cpp" 
    "src/core/SkBitmapProcState.cpp" 
    "src/core/SkBitmapProcState_matrixProcs.cpp" 
    "src/core/SkBitmapScaler.cpp" 
    "src/effects/SkBitmapSource.cpp" 
    "src/core/SkBitmap_scroll.cpp" 
    "src/core/SkBlitMask_D32.cpp" 
    "src/core/SkBlitRow_D16.cpp" 
    "src/core/SkBlitRow_D32.cpp" 
    "src/core/SkBlitter.cpp" 
    "src/core/SkBlitter_A8.cpp" 
    "src/core/SkBlitter_ARGB32.cpp" 
    "src/core/SkBlitter_RGB16.cpp" 
    "src/core/SkBlitter_Sprite.cpp" 
    "src/effects/SkBlurDrawLooper.cpp" 
    "src/effects/SkBlurImageFilter.cpp" 
    "src/effects/SkBlurMask.cpp" 
    "src/effects/SkBlurMaskFilter.cpp" 
    "src/utils/SkBoundaryPatch.cpp" 
    "src/core/SkBuffer.cpp" 
    "src/lazy/SkCachingPixelRef.cpp" 
    "src/utils/SkCamera.cpp" 
    "src/core/SkCanvas.cpp" 
    "src/utils/SkCanvasStack.cpp" 
    "src/utils/SkCanvasStateUtils.cpp" 
    "src/core/SkChunkAlloc.cpp" 
    "src/effects/gradients/SkClampRange.cpp" 
    "src/core/SkClipStack.cpp" 
    "src/core/SkColor.cpp" 
    "src/core/SkColorFilter.cpp" 
    "src/effects/SkColorFilterImageFilter.cpp" 
    "src/effects/SkColorFilters.cpp" 
    "src/effects/SkColorMatrix.cpp" 
    "src/effects/SkColorMatrixFilter.cpp" 
    "src/core/SkColorTable.cpp" 
    "src/effects/SkComposeImageFilter.cpp" 
    "src/core/SkComposeShader.cpp" 
    "src/utils/SkCondVar.cpp" 
    "src/core/SkConfig8888.cpp" 
    "src/core/SkConvolver.cpp" 
    "src/effects/SkCornerPathEffect.cpp" 
    "src/core/SkCubicClipper.cpp" 
    "src/utils/SkCubicInterval.cpp" 
    "src/utils/SkCullPoints.cpp" 
    "src/pathops/SkDCubicIntersection.cpp" 
    "src/pathops/SkDCubicLineIntersection.cpp" 
    "src/pathops/SkDCubicToQuads.cpp" 
    "src/pathops/SkDLineIntersection.cpp" 
    "src/pathops/SkDQuadImplicit.cpp" 
    "src/pathops/SkDQuadIntersection.cpp" 
    "src/pathops/SkDQuadLineIntersection.cpp" 
    "src/utils/SkDashPath.cpp" 
    "src/effects/SkDashPathEffect.cpp" 
    "src/core/SkData.cpp" 
    "src/core/SkDataTable.cpp" 
    "src/core/SkDebug.cpp" 
    "src/gpu/gl/debug/SkDebugGLContext.cpp" 
    "src/ports/SkDebug_win.cpp" 
    "src/core/SkDeque.cpp" 
    "src/core/SkDevice.cpp" 
    "src/core/SkDeviceLooper.cpp" 
    "src/core/SkDeviceProfile.cpp" 
    "src/lazy/SkDiscardableMemoryPool.cpp" 
    "src/ports/SkDiscardableMemory_none.cpp" 
    "src/lazy/SkDiscardablePixelRef.cpp" 
    "src/effects/SkDiscretePathEffect.cpp" 
    "src/effects/SkDisplacementMapEffect.cpp" 
    "src/core/SkDistanceFieldGen.cpp" 
    "src/core/SkDither.cpp" 
    "src/doc/SkDocument.cpp" 
    "src/core/SkDraw.cpp" 
    "src/core/SkDrawLooper.cpp" 
    "src/effects/SkDropShadowImageFilter.cpp" 
    "src/utils/SkDumpCanvas.cpp" 
    "src/core/SkEdge.cpp" 
    "src/core/SkEdgeBuilder.cpp" 
    "src/core/SkEdgeClipper.cpp" 
    "src/effects/SkEmbossMask.cpp" 
    "src/effects/SkEmbossMaskFilter.cpp" 
    "src/core/SkError.cpp" 
    "src/utils/SkEventTracer.cpp" 
    "src/core/SkFilterProc.cpp" 
    "src/core/SkFilterShader.cpp" 
    "src/core/SkFlattenable.cpp" 
    "src/core/SkFlattenableSerialization.cpp" 
    "src/core/SkFloat.cpp" 
    "src/core/SkFloatBits.cpp" 
    "src/core/SkFont.cpp" 
    "src/core/SkFontDescriptor.cpp" 
    "src/core/SkFontHost.cpp" 
    "src/fonts/SkFontMgr_indirect.cpp" 
    "src/core/SkFontStream.cpp" 
    "src/utils/SkFrontBufferedStream.cpp" 
    "src/gpu/gl/SkGLContextHelper.cpp" 
    "src/fonts/SkGScalerContext.cpp" 
    "src/utils/SkGatherPixelRefsAndRects.cpp" 
    "src/core/SkGeometry.cpp" 
    "src/ports/SkGlobalInitialization_default.cpp" 
    "src/core/SkGlyphCache.cpp" 
    "src/effects/SkGpuBlurUtils.cpp" 
    "src/gpu/SkGpuDevice.cpp" 
    "src/gpu/SkGr.cpp" 
    "src/gpu/SkGrPixelRef.cpp" 
    "src/gpu/SkGrTexturePixelRef.cpp" 
    "src/effects/gradients/SkGradientBitmapCache.cpp" 
    "src/effects/gradients/SkGradientShader.cpp" 
    "src/core/SkGraphics.cpp" 
    "src/utils/win/SkHRESULT.cpp" 
    #"src/utils/win/SkIStream.cpp" 
    "src/image/SkImage.cpp" 
    "src/images/SkImageDecoder.cpp" 
    "src/images/SkImageEncoder.cpp" 
    "src/images/SkImageEncoder_Factory.cpp" 
    "src/core/SkImageFilter.cpp" 
    "src/core/SkImageGenerator.cpp" 
    "src/core/SkImageInfo.cpp" 
    "src/image/SkImagePriv.cpp" 
    "src/image/SkImage_Raster.cpp" 
    "src/core/SkInstCnt.cpp" 
    "src/utils/SkInterpolator.cpp" 
    "src/pathops/SkIntersections.cpp" 
    "src/utils/SkLayer.cpp" 
    "src/effects/SkLayerDrawLooper.cpp" 
    "src/effects/SkLayerRasterizer.cpp" 
    "src/effects/SkLerpXfermode.cpp" 
    "src/effects/SkLightingImageFilter.cpp" 
    "src/core/SkLineClipper.cpp" 
    "src/effects/gradients/SkLinearGradient.cpp" 
    "src/core/SkLocalMatrixShader.cpp" 
    "src/effects/SkLumaColorFilter.cpp" 
    "src/utils/SkMD5.cpp" 
    "src/effects/SkMagnifierImageFilter.cpp" 
    "src/core/SkMallocPixelRef.cpp" 
    "src/core/SkMask.cpp" 
    "src/core/SkMaskFilter.cpp" 
    "src/core/SkMaskGamma.cpp" 
    "src/core/SkMath.cpp" 
    "src/core/SkMatrix.cpp" 
    "src/utils/SkMatrix22.cpp" 
    "src/utils/SkMatrix44.cpp" 
    "src/effects/SkMatrixConvolutionImageFilter.cpp" 
    "src/effects/SkMatrixImageFilter.cpp" 
    "src/ports/SkMemory_malloc.cpp" 
    "src/effects/SkMergeImageFilter.cpp" 
    "src/utils/SkMeshUtils.cpp" 
    "src/core/SkMetaData.cpp" 
    "src/core/SkMipMap.cpp" 
    "src/effects/SkMorphologyImageFilter.cpp" 
    "src/core/SkMultiPictureDraw.cpp" 
    "src/utils/SkNWayCanvas.cpp" 
    "src/utils/SkNinePatch.cpp" 
    "src/utils/SkNullCanvas.cpp" 
    "src/gpu/gl/SkNullGLContext.cpp" 
    "src/utils/SkOSFile.cpp" 
    "src/ports/SkOSFile_stdio.cpp" 
    "src/sfnt/SkOTTable_name.cpp" 
    "src/sfnt/SkOTUtils.cpp" 
    "src/effects/SkOffsetImageFilter.cpp" 
    "src/pathops/SkOpAngle.cpp" 
    "src/pathops/SkOpContour.cpp" 
    "src/pathops/SkOpEdgeBuilder.cpp" 
    "src/pathops/SkOpSegment.cpp" 
    "src/core/SkPackBits.cpp" 
    "src/core/SkPaint.cpp" 
    "src/effects/SkPaintFlagsDrawFilter.cpp" 
    "src/core/SkPaintPriv.cpp" 
    "src/utils/SkParse.cpp" 
    "src/utils/SkParseColor.cpp" 
    "src/utils/SkParsePath.cpp" 
    "src/utils/SkPatchGrid.cpp" 
    "src/utils/SkPatchUtils.cpp" 
    "src/core/SkPath.cpp" 
    "src/core/SkPathEffect.cpp" 
    "src/core/SkPathHeap.cpp" 
    "src/core/SkPathMeasure.cpp" 
    "src/pathops/SkPathOpsBounds.cpp" 
    "src/pathops/SkPathOpsCommon.cpp" 
    "src/pathops/SkPathOpsCubic.cpp" 
    "src/pathops/SkPathOpsDebug.cpp" 
    "src/pathops/SkPathOpsLine.cpp" 
    "src/pathops/SkPathOpsOp.cpp" 
    "src/pathops/SkPathOpsPoint.cpp" 
    "src/pathops/SkPathOpsQuad.cpp" 
    "src/pathops/SkPathOpsRect.cpp" 
    "src/pathops/SkPathOpsSimplify.cpp" 
    "src/pathops/SkPathOpsTightBounds.cpp" 
    "src/pathops/SkPathOpsTriangle.cpp" 
    "src/pathops/SkPathOpsTypes.cpp" 
    "src/core/SkPathRef.cpp" 
    "src/utils/SkPathUtils.cpp" 
    "src/pathops/SkPathWriter.cpp" 
    "src/effects/SkPerlinNoiseShader.cpp" 
    "src/core/SkPicture.cpp" 
    "src/core/SkPictureContentInfo.cpp" 
    "src/core/SkPictureData.cpp" 
    "src/core/SkPictureFlat.cpp" 
    "src/effects/SkPictureImageFilter.cpp" 
    "src/core/SkPicturePlayback.cpp" 
    "src/core/SkPictureRecord.cpp" 
    "src/core/SkPictureRecorder.cpp" 
    "src/core/SkPictureShader.cpp" 
    "src/core/SkPictureStateTree.cpp" 
    "src/utils/SkPictureUtils.cpp" 
    "src/core/SkPixelRef.cpp" 
    "src/effects/SkPixelXorXfermode.cpp" 
    "src/core/SkPoint.cpp" 
    "src/effects/SkPorterDuff.cpp" 
    "src/core/SkProcSpriteBlitter.cpp" 
    "src/utils/SkProxyCanvas.cpp" 
    "src/core/SkPtrRecorder.cpp" 
    "src/core/SkQuadClipper.cpp" 
    "src/pathops/SkQuarticRoot.cpp" 
    "src/core/SkRRect.cpp" 
    "src/utils/SkRTConf.cpp"   
    "src/core/SkRTree.cpp" 
    "src/effects/gradients/SkRadialGradient.cpp" 
    "src/core/SkRasterClip.cpp" 
    "src/core/SkRasterizer.cpp" 
    "src/core/SkReadBuffer.cpp" 
    "src/core/SkRecordDraw.cpp" 
    "src/core/SkRecordOpts.cpp" 
    "src/core/SkRecorder.cpp" 
    "src/core/SkRecording.cpp" 
    "src/core/SkRect.cpp" 
    "src/effects/SkRectShaderImageFilter.cpp" 
    "src/pathops/SkReduceOrder.cpp" 
    "src/core/SkRefDict.cpp" 
    "src/core/SkRegion.cpp" 
    "src/core/SkRegion_path.cpp" 
    "src/fonts/SkRemotableFontMgr.cpp" 
    "src/core/SkResourceCache.cpp" 
    "src/utils/SkSHA1.cpp" 
    "src/core/SkScalar.cpp" 
    "src/core/SkScalerContext.cpp" 
    "src/core/SkScan.cpp" 
    "src/core/SkScan_AntiPath.cpp" 
    "src/core/SkScan_Antihair.cpp" 
    "src/core/SkScan_Hairline.cpp" 
    "src/core/SkScan_Path.cpp" 
    "src/core/SkShader.cpp" 
    "src/core/SkSpriteBlitter_ARGB32.cpp" 
    "src/core/SkSpriteBlitter_RGB16.cpp" 
    "src/core/SkStream.cpp" 
    "src/core/SkString.cpp" 
    "src/core/SkStringUtils.cpp" 
    "src/core/SkStroke.cpp" 
    "src/core/SkStrokeRec.cpp" 
    "src/core/SkStrokerPriv.cpp"   
    "src/image/SkSurface.cpp" 
    "src/image/SkSurface_Raster.cpp" 
    "src/effects/gradients/SkSweepGradient.cpp" 
    "src/core/SkTLS.cpp" 
    "src/core/SkTSearch.cpp" 
    "src/effects/SkTableColorFilter.cpp" 
    "src/effects/SkTableMaskFilter.cpp" 
    "src/effects/SkTestImageFilters.cpp" 
    "src/fonts/SkTestScalerContext.cpp" 
    "src/core/SkTextBlob.cpp" 
    "src/opts/SkTextureCompression_opts_none.cpp" 
    "src/utils/SkTextureCompressor.cpp" 
    "src/utils/SkTextureCompressor_ASTC.cpp" 
    "src/utils/SkTextureCompressor_LATC.cpp" 
    "src/utils/SkTextureCompressor_R11EAC.cpp"        
    "src/core/SkTileGrid.cpp" 
    "src/effects/SkTileImageFilter.cpp" 
    "src/effects/SkTransparentShader.cpp" 
    "src/effects/gradients/SkTwoPointConicalGradient.cpp" 
    "src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp" 
    "src/effects/gradients/SkTwoPointRadialGradient.cpp" 
    "src/core/SkTypeface.cpp" 
    "src/core/SkTypefaceCache.cpp" 
    "src/core/SkUnPreMultiply.cpp" 
    "src/core/SkUtils.cpp" 
    "src/core/SkValidatingReadBuffer.cpp" 
    "src/core/SkVertState.cpp" 
    "src/core/SkWriteBuffer.cpp" 
    "src/core/SkWriter32.cpp" 
    "src/core/SkXfermode.cpp" 
    "src/effects/SkXfermodeImageFilter.cpp" 
    )

    
if (CMAKE_SYSTEM_NAME MATCHES Windows)
    set(srcs
        ${srcs}
        "src/ports/SkFontMgr_default_gdi.cpp" 
        "src/ports/SkFontHost_win.cpp" 
        "src/gpu/gl/win/SkNativeGLContext_win.cpp" 
        "src/ports/SkOSFile_win.cpp" 
        "src/ports/SkTLS_win.cpp" 
        "src/utils/SkThreadUtils_win.cpp" 
        "src/ports/SkTime_win.cpp" 
        "src/utils/win/SkWGL_win.cpp" 
        "src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp" 
    )
elseif(CMAKE_SYSTEM_NAME MATCHES Darwin)
    set(srcs
        ${srcs}
        "src/ports/SkFontMgr_fontconfig.cpp"
        "src/ports/SkFontHost_fontconfig.cpp"
        "src/ports/SkOSFile_posix.cpp" 
        "src/ports/SkTLS_pthread.cpp" 
        "src/utils/SkThreadUtils_pthread.cpp" 
        "src/utils/SkThreadUtils_pthread_mach.cpp" 
        "src/ports/SkTime_Unix.cpp" 
        "src/ports/SkFontHost_FreeType_common.cpp"
        "src/ports/SkFontHost_FreeType.cpp"
        "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp"
    )
else()
    set(srcs
        ${srcs}
        "src/ports/SkFontMgr_fontconfig.cpp"
        "src/ports/SkFontHost_fontconfig.cpp"
        "src/ports/SkOSFile_posix.cpp" 
        "src/ports/SkTLS_pthread.cpp" 
        "src/utils/SkThreadUtils_pthread.cpp" 
        "src/utils/SkThreadUtils_pthread_linux.cpp" 
        "src/ports/SkTime_Unix.cpp" 
        "src/ports/SkFontHost_FreeType_common.cpp"
        "src/ports/SkFontHost_FreeType.cpp"
        "src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp"
    )
endif()
#message("...........plat....${CMAKE_GENERATOR_PLATFORM}")
if(("${CMAKE_GENERATOR_PLATFORM}" MATCHES "ARM64") OR (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") OR (CMAKE_SYSTEM_PROCESSOR MATCHES "arm"))
if(MSVC)
set(srcs
    ${srcs}
    "src/opts/SkXfermode_opts_none.cpp"
    "src/opts/SkBitmapProcState_opts_none.cpp"
    "src/opts/SkBlitRow_opts_none.cpp"
    "src/opts/SkBlurImage_opts_none.cpp"
    "src/opts/SkMorphology_opts_none.cpp"
    "src/opts/SkUtils_opts_none.cpp"
    "src/opts/SkBlitMask_opts_none.cpp"
)
else()
set(srcs
    ${srcs}
    "src/opts/memset.arm.S"
#    "src/opts/memset16_neon.S"
#    "src/opts/memset32_neon.S"
    "src/opts/SkBitmapProcState_arm_neon.cpp"
    "src/opts/SkBitmapProcState_matrixProcs_neon.cpp"
    "src/opts/SkBitmapProcState_opts_arm.cpp"
    "src/opts/SkBlitMask_opts_arm_neon.cpp"
    "src/opts/SkBlitMask_opts_arm.cpp"
    "src/opts/SkBlitRow_opts_arm_neon.cpp"
    "src/opts/SkBlitRow_opts_arm.cpp"
    "src/opts/SkBlurImage_opts_arm.cpp"
    "src/opts/SkBlurImage_opts_neon.cpp"
    "src/opts/SkMorphology_opts_arm.cpp"
    "src/opts/SkMorphology_opts_neon.cpp"
    "src/opts/SkTextureCompression_opts_arm.cpp"
    "src/opts/SkTextureCompression_opts_neon.cpp"
    "src/opts/SkUtils_opts_arm.cpp"
    "src/opts/SkXfermode_opts_arm_neon.cpp"
    "src/opts/SkXfermode_opts_arm.cpp"
#    "src/opts/SkXfermode_opts_none.cpp"
#    "src/opts/SkBitmapProcState_opts_none.cpp"
#    "src/opts/SkBlitRow_opts_none.cpp"
#    "src/opts/SkBlurImage_opts_none.cpp"
#    "src/opts/SkMorphology_opts_none.cpp"
#    "src/opts/SkUtils_opts_none.cpp"
#    "src/opts/SkBlitMask_opts_none.cpp"
)
endif(MSVC)
else()
set(srcs
    ${srcs}
    "src/opts/opts_check_x86.cpp"
    "src/opts/SkXfermode_opts_SSE2.cpp"
    "src/opts/SkBitmapFilter_opts_SSE2.cpp"
    "src/opts/SkBitmapProcState_opts_SSE2.cpp"
    "src/opts/SkBitmapProcState_opts_SSSE3.cpp"
    "src/opts/SkBlitRect_opts_SSE2.cpp"
    "src/opts/SkBlitRow_opts_SSE2.cpp"
    "src/opts/SkBlurImage_opts_SSE2.cpp"
    "src/opts/SkBlurImage_opts_SSE4.cpp"
    "src/opts/SkMorphology_opts_SSE2.cpp"
    "src/opts/SkUtils_opts_SSE2.cpp"
)
endif()

source_group("Header Files" FILES ${headers})
source_group("Source Files" FILES ${srcs})

add_library(skia STATIC ${srcs} ${headers})

if (NOT CMAKE_SYSTEM_NAME MATCHES Windows)
    if(NOT TARGET freetype)
        message(FATAL_ERROR "freetype target not found. Make sure freetype is built before cairo.")
    endif()

    if(NOT TARGET fontconfig)
        message(FATAL_ERROR "fontconfig target not found. Make sure fontconfig is built before cairo.")
    endif()

    get_target_property(FREETYPE_INCLUDE_DIRS freetype INTERFACE_INCLUDE_DIRECTORIES)
    get_target_property(FONTCONFIG_INCLUDE_DIRS fontconfig INTERFACE_INCLUDE_DIRECTORIES)
    # 使用项目中的freetype和fontconfig而不是系统库
    target_include_directories(skia PRIVATE 
        ${FREETYPE_INCLUDE_DIRS}
        ${FONTCONFIG_INCLUDE_DIRS}
    )
    target_compile_options(skia PRIVATE -fPIC)
endif()

set(COM_LIBS ${COM_LIBS} skia CACHE INTERNAL "com_lib")
set_target_properties (skia PROPERTIES
    FOLDER third-part
)

install(TARGETS skia
    CONFIGURATIONS Release
    RUNTIME DESTINATION bin/Release
    LIBRARY DESTINATION lib/Release
    ARCHIVE DESTINATION lib/Release
)

install(TARGETS skia
    CONFIGURATIONS Debug
    RUNTIME DESTINATION bin/Debug
    LIBRARY DESTINATION lib/Debug
    ARCHIVE DESTINATION lib/Debug
)
